<include file="Common:header" />
<!-- /. NAV SIDE  -->
<include file="Common:left" />
<!-- /. NAV SIDE  -->
<div id="page-wrapper">
	<div class="header">
		<h1 class="page-header">
			提问管理 <small>Welcome {$Think.config.system_tag}</small>
		</h1>
		<ol class="breadcrumb">
			<li><a href="{:U('Index/index')}">首页</a></li>
			<li class="active">提问列表</li>
			<div style="float:right"></div>
		</ol>
	</div>
	<div id="page-inner">
		<div class="row">
			<div class="col-xs-12">
				<!--Search content-->
				<div class="panel panel-default" style="margin-bottom:0px; border-bottom:none">
					<div class="panel-body">
						<form class="layui-form" action="{:U('Questions/questionsList')}" method="post">
							<div class="layui-form-item">
								<label class="layui-form-label" style="width:auto;">用户昵称</label>
								<div class="layui-input-inline">
									<input value="{$filter.username}" type="text" name="username" placeholder="请输入用户昵称" autocomplete="off" class="layui-input">
								</div>
								<label class="layui-form-label" style="width:auto;">状态</label>
								<div class="layui-input-inline">
									<select name="status" lay-verify="">
										<option value="">请选择</option>
										<notempty name="statusList">
											<volist name="statusList" id="vo">
												<option value="{$vo.id}" <if condition="isset($filter['status'])&&($filter['status'] eq $vo['id'])">selected</if>>{$vo.name}</option>
												</li>
											</volist>
										</notempty>
									</select>
								</div>
								<div class="layui-input-inline" style="width:auto;">
									<button type="submit" class="btn btn-default">搜索</button>
								</div>
							</div>
						</form>
					</div>
				</div>
				<!--Search content-->
				<!--Formlist content-->
				<div class="panel panel-default">
					<div class="panel-body">
						<div class="table-responsive">
							<table class="table table-hover">
								<thead>
									<tr>
										<th>序号</th>
										<th>所属用户</th>
										<th>提问问题</th>
										<th>提问时间</th>
										<th>状态</th>
										<th>操作</th>
									</tr>
								</thead>
								<tbody>
									<volist name="list" id="vo">
										<tr>
											<td style="line-height:30px">{$vo.id}</td>
											<td style="line-height:30px">{$vo.username}</td>
											<td style="line-height:30px">{$vo.title}</td>
											<td style="line-height:30px">{$vo.addtime}</td>
											<td>
											<if condition="$vo.status eq 0">
											待审核
											<elseif condition="$vo.status eq 1" />
											已审核
											<else />
											审核失败
											</if>
											</td>
											<td>
											<if condition="$vo.status eq 0">
												<a href="javascript:void(0)" class="layui-btn layui-btn-xs layui-btn-normal" onclick="openlayer('修改','{:U(\'Questions/auitQuestions\',array(\'id\'=>$vo[\'id\']))}');return false;">审核</a>
											<elseif condition="$vo.status eq 1" />
												<a href="javascript:void(0)" class="layui-btn layui-btn-xs layui-btn-normal" onclick="openlayer('回答','{:U(\'Questions/answerQuestions\',array(\'id\'=>$vo[\'id\']))}');return false;">回答</a>
											</if>
											<a href="javascript:void(0)" class="layui-btn layui-btn-xs layui-btn-danger" onclick="ajaxConfirm('确定要删除吗?','{:U(\'Questions/deleteQuestions\',array(\'id\'=>$vo[\'id\']))}')">删除</a>
											</td>
										</tr>
									</volist>
								</tbody>
							</table>
							{$page}
						</div>
					</div>
				</div>
				<!--Formlist content-->
			</div>
		</div>
	</div>
	<include file="Common:foot" />
	<script>
		layui.use('form', function(){
		  var form = layui.form;
		});
	</script>
	 <!-- /. PAGE INNER  -->
</div>
<include file="Common:footer" />
    